﻿@model S4Store.Models.AfterSaleCarKPI.AfterSaleCarDecoratingListModel
@{
    ViewBag.Title = "MonthConfig";
    Layout = null;
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
}
@{int i = 0;}
<form class="pageForm addpage" action="@Url.Action("ModifyBackInputAfterSaleDecoratingMonthConfig")" method="post">
<div style=" height:100%; width:100%; overflow:hidden" class="verticalSplitContainer">
    <div class="" style="overflow: auto;" ratio="#180">
       <table  class="rpttable"  style="border-collapse:collapse;">
            <tr height="170"  class="vtr">
                <th class="yellow" ><div class="wd60 pd510"><div class="wd20">车型名称</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">装潢率目标(%)</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">装潢额目标(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">目标单车装潢销售额(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">养护产品销售率目标(%)</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">养护产品销售额目标(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">目标养护产品单车销售额(万)</div></div>
                </th>
            </tr>
</table>
</div>
<div class="" style="overflow: auto;" ratio="*">
 <table  class="rpttable"  style="border-collapse:collapse;">
            @foreach (var brand in Model.CarBrands)
            {
                var item = Model.AfterSaleCarDecoratingMonthConfigs.Where(o => o.CarBrandId == brand.Id).FirstOrDefault();
                if (item == null)
                {
                    item = new S4Store.Domain.AfterSaleKpi.AfterSaleCarDecoratingMonthConfig();
                }
                <tr>
                    <td><div class="wd60 pd510">@brand.Name<input type="hidden" name="afterSaleCarlist[@i].CarBrandId" value="@brand.Id" />
                    </td>
                    <td><div class="wd40 pd55">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarlist[@i].ZHLMB_DecoratingTargetRate" value="@item.ZHLMB_DecoratingTargetRate" />
                    </td>
                    <td><div class="wd40 pd55">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarlist[@i].ZHEMB_DecoratingTargetValume" value="@item.ZHEMB_DecoratingTargetValume" />
                    </td>
                    <td><div class="wd40 pd55">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarlist[@i].MBDCZHE_DecoratingTargetValumeOnUnitCar" value="@item.MBDCZHE_DecoratingTargetValumeOnUnitCar" />
                    </td>
                    <td><div class="wd40 pd55">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarlist[@i].YHCPXSLMB_SaleMaintenanceTargetRate" value="@item.YHCPXSLMB_SaleMaintenanceTargetRate" />
                    </td>
                    <td><div class="wd40 pd55">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarlist[@i].YHCPXSEMB_SaleMaintenanceTargetValume" value="@item.YHCPXSEMB_SaleMaintenanceTargetValume" />
                    </td>
                    <td><div class="wd40 pd55">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarlist[@i].YHCPDCXSE_SaleMaintenanceTargetValumeOnUnitCar" value="@item.YHCPDCXSE_SaleMaintenanceTargetValumeOnUnitCar" />
                    </td>
                    
                </tr>
               i++;
            }
        </table>
    </div>
    <input type="hidden" name="y" value="@Model.Date.Year" /> <input type="hidden" name="m" value="@Model.Date.Month" />
        <div class="formBar" ratio="#30">
    @if (!Model.isconfirmed || CurrentUser.Position == S4Store.Domain.Position.SystemManager)
    {
        <ul>
            <li>
                <div class="simplebutton">
                    <div class="r">
                        <button type="button" class="submit">
                            保存</button></div>
                </div>
            </li>
            <li>确认数据：<input type="checkbox" name="isconfirm" value="true" /></li>
        </ul>
    }
    </div>
</div>
</form>
